<template>
  <div class="persion">
    <p>姓名:{{ name }}</p>
    <p>年龄:{{ age }}</p>
    <button @click="changeName">修改名字</button>
    <button @click="changeAge">修改年龄</button>
    <button @click="showTel">查看联系方式</button>
  </div>
</template>

<script lang="ts" setup name="persion123">
import { ref } from 'vue'
let name = ref('zhangsan')
let age = ref(18)
let tel = 133333333

function changeName() {
  name.value = '张'
}
function changeAge() {
  age.value += 1
}
function showTel() {
  alert(tel)
}
</script>

<style lang="scss"></style>
